Integrand size = 39, antiderivative size = 175 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 (20 A+15 B+13 C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^3 (20 A+15 B+13 C) \tan (c+d x)}{5 d}+\frac {3 a^3 (20 A+15 B+13 C) \sec (c+d x) \tan (c+d x)}{40 d}+\frac {(5 B-C) (a+a \sec (c+d x))^3 \tan (c+d x)}{20 d}+\frac {C (a+a \sec (c+d x))^4 \tan (c+d x)}{5 a d}+\frac {a^3 (20 A+15 B+13 C) \tan ^3(c+d x)}{60 d} \]
1/8*a^3*(20*A+15*B+13*C)*arctanh(sin(d*x+c))/d+1/5*a^3*(20*A+15*B+13*C)*ta n(d*x+c)/d+3/40*a^3*(20*A+15*B+13*C)*sec(d*x+c)*tan(d*x+c)/d+1/20*(5*B-C)* (a+a*sec(d*x+c))^3*tan(d*x+c)/d+1/5*C*(a+a*sec(d*x+c))^4*tan(d*x+c)/a/d+1/ 60*a^3*(20*A+15*B+13*C)*tan(d*x+c)^3/d
Time = 5.76 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.62 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3 \left (15 (20 A+15 B+13 C) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (15 (12 A+15 B+13 C) \sec (c+d x)+30 (B+3 C) \sec ^3(c+d x)+8 \left (60 (A+B+C)+5 (A+3 B+5 C) \tan ^2(c+d x)+3 C \tan ^4(c+d x)\right )\right )\right )}{120 d} \]
(a^3*(15*(20*A + 15*B + 13*C)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(15*(12 *A + 15*B + 13*C)*Sec[c + d*x] + 30*(B + 3*C)*Sec[c + d*x]^3 + 8*(60*(A + B + C) + 5*(A + 3*B + 5*C)*Tan[c + d*x]^2 + 3*C*Tan[c + d*x]^4))))/(120*d)
Time = 0.64 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3042, 4570, 3042, 4489, 3042, 4278, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a \sec (c+d x)+a)^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4570 |
\(\displaystyle \frac {\int \sec (c+d x) (\sec (c+d x) a+a)^3 (a (5 A+4 C)+a (5 B-C) \sec (c+d x))dx}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3 \left (a (5 A+4 C)+a (5 B-C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
\(\Big \downarrow \) 4489 |
\(\displaystyle \frac {\frac {1}{4} a (20 A+15 B+13 C) \int \sec (c+d x) (\sec (c+d x) a+a)^3dx+\frac {a (5 B-C) \tan (c+d x) (a \sec (c+d x)+a)^3}{4 d}}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} a (20 A+15 B+13 C) \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3dx+\frac {a (5 B-C) \tan (c+d x) (a \sec (c+d x)+a)^3}{4 d}}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
\(\Big \downarrow \) 4278 |
\(\displaystyle \frac {\frac {1}{4} a (20 A+15 B+13 C) \int \left (a^3 \sec ^4(c+d x)+3 a^3 \sec ^3(c+d x)+3 a^3 \sec ^2(c+d x)+a^3 \sec (c+d x)\right )dx+\frac {a (5 B-C) \tan (c+d x) (a \sec (c+d x)+a)^3}{4 d}}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{4} a (20 A+15 B+13 C) \left (\frac {5 a^3 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}+\frac {4 a^3 \tan (c+d x)}{d}+\frac {3 a^3 \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (5 B-C) \tan (c+d x) (a \sec (c+d x)+a)^3}{4 d}}{5 a}+\frac {C \tan (c+d x) (a \sec (c+d x)+a)^4}{5 a d}\) |
(C*(a + a*Sec[c + d*x])^4*Tan[c + d*x])/(5*a*d) + ((a*(5*B - C)*(a + a*Sec [c + d*x])^3*Tan[c + d*x])/(4*d) + (a*(20*A + 15*B + 13*C)*((5*a^3*ArcTanh [Sin[c + d*x]])/(2*d) + (4*a^3*Tan[c + d*x])/d + (3*a^3*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (a^3*Tan[c + d*x]^3)/(3*d)))/4)/(5*a)
3.5.29.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[ExpandTrig[(a + b*csc[e + f*x])^m*(d*csc[e + f *x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && I GtQ[m, 0] && RationalQ[n]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[(a*B*m + A*b*(m + 1))/(b*(m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B , e, f, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b *(m + 1), 0] && !LtQ[m, -2^(-1)]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e _.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) )), x] + Simp[1/(b*(m + 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 0.80 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.27
method | result | size |
norman | \(\frac {-\frac {32 a^{3} \left (20 A +15 B +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}+\frac {7 a^{3} \left (20 A +15 B +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 d}-\frac {a^{3} \left (20 A +15 B +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}+\frac {a^{3} \left (212 A +183 B +133 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 d}-\frac {a^{3} \left (49 B +44 A +51 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5}}-\frac {a^{3} \left (20 A +15 B +13 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a^{3} \left (20 A +15 B +13 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(222\) |
parts | \(\frac {\left (3 a^{3} A +B \,a^{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (B \,a^{3}+3 a^{3} C \right ) \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {\left (a^{3} A +3 B \,a^{3}+3 a^{3} C \right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (3 a^{3} A +3 B \,a^{3}+a^{3} C \right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right ) a^{3}}{d}-\frac {a^{3} C \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(237\) |
parallelrisch | \(-\frac {5 a^{3} \left (\left (A +\frac {3 B}{4}+\frac {13 C}{20}\right ) \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\left (A +\frac {3 B}{4}+\frac {13 C}{20}\right ) \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-\frac {12 A}{5}-\frac {19 B}{5}-5 C \right ) \sin \left (2 d x +2 c \right )+\left (-\frac {76 C}{15}-\frac {74 A}{15}-\frac {26 B}{5}\right ) \sin \left (3 d x +3 c \right )+\left (-\frac {3 B}{2}-\frac {13 C}{10}-\frac {6 A}{5}\right ) \sin \left (4 d x +4 c \right )+\left (-\frac {76 C}{75}-\frac {22 A}{15}-\frac {6 B}{5}\right ) \sin \left (5 d x +5 c \right )-\frac {52 \left (A +\frac {15 B}{13}+\frac {20 C}{13}\right ) \sin \left (d x +c \right )}{15}\right )}{2 d \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right )}\) | \(238\) |
derivativedivides | \(\frac {-a^{3} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a^{3} C \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+3 a^{3} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 B \,a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} C \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a^{3} A \tan \left (d x +c \right )+3 B \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 a^{3} C \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+a^{3} C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(363\) |
default | \(\frac {-a^{3} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{3} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-a^{3} C \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+3 a^{3} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 B \,a^{3} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+3 a^{3} C \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a^{3} A \tan \left (d x +c \right )+3 B \,a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 a^{3} C \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+a^{3} C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(363\) |
risch | \(-\frac {i a^{3} \left (-304 C -440 A -360 B -360 A \,{\mathrm e}^{8 i \left (d x +c \right )}+360 A \,{\mathrm e}^{7 i \left (d x +c \right )}-360 A \,{\mathrm e}^{3 i \left (d x +c \right )}-180 A \,{\mathrm e}^{i \left (d x +c \right )}-2400 B \,{\mathrm e}^{4 i \left (d x +c \right )}-1680 A \,{\mathrm e}^{6 i \left (d x +c \right )}-720 C \,{\mathrm e}^{6 i \left (d x +c \right )}-2720 A \,{\mathrm e}^{4 i \left (d x +c \right )}-2320 C \,{\mathrm e}^{4 i \left (d x +c \right )}-1840 A \,{\mathrm e}^{2 i \left (d x +c \right )}-1520 C \,{\mathrm e}^{2 i \left (d x +c \right )}+750 C \,{\mathrm e}^{7 i \left (d x +c \right )}-750 C \,{\mathrm e}^{3 i \left (d x +c \right )}-1680 B \,{\mathrm e}^{2 i \left (d x +c \right )}-195 C \,{\mathrm e}^{i \left (d x +c \right )}+180 A \,{\mathrm e}^{9 i \left (d x +c \right )}+195 C \,{\mathrm e}^{9 i \left (d x +c \right )}-225 B \,{\mathrm e}^{i \left (d x +c \right )}-120 B \,{\mathrm e}^{8 i \left (d x +c \right )}+225 B \,{\mathrm e}^{9 i \left (d x +c \right )}-1200 B \,{\mathrm e}^{6 i \left (d x +c \right )}-570 B \,{\mathrm e}^{3 i \left (d x +c \right )}+570 B \,{\mathrm e}^{7 i \left (d x +c \right )}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {5 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 d}+\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{8 d}+\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}-\frac {5 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 d}-\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{8 d}-\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}\) | \(442\) |
(-32/15*a^3*(20*A+15*B+13*C)/d*tan(1/2*d*x+1/2*c)^5+7/6*a^3*(20*A+15*B+13* C)/d*tan(1/2*d*x+1/2*c)^7-1/4*a^3*(20*A+15*B+13*C)/d*tan(1/2*d*x+1/2*c)^9+ 1/6*a^3*(212*A+183*B+133*C)/d*tan(1/2*d*x+1/2*c)^3-1/4*a^3*(49*B+44*A+51*C )/d*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2-1)^5-1/8*a^3*(20*A+15*B+13*C )/d*ln(tan(1/2*d*x+1/2*c)-1)+1/8*a^3*(20*A+15*B+13*C)/d*ln(tan(1/2*d*x+1/2 *c)+1)
Time = 0.27 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.03 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (20 \, A + 15 \, B + 13 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (20 \, A + 15 \, B + 13 \, C\right )} a^{3} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (55 \, A + 45 \, B + 38 \, C\right )} a^{3} \cos \left (d x + c\right )^{4} + 15 \, {\left (12 \, A + 15 \, B + 13 \, C\right )} a^{3} \cos \left (d x + c\right )^{3} + 8 \, {\left (5 \, A + 15 \, B + 19 \, C\right )} a^{3} \cos \left (d x + c\right )^{2} + 30 \, {\left (B + 3 \, C\right )} a^{3} \cos \left (d x + c\right ) + 24 \, C a^{3}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \]
integrate(sec(d*x+c)*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
1/240*(15*(20*A + 15*B + 13*C)*a^3*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 15*(20*A + 15*B + 13*C)*a^3*cos(d*x + c)^5*log(-sin(d*x + c) + 1) + 2*(8*( 55*A + 45*B + 38*C)*a^3*cos(d*x + c)^4 + 15*(12*A + 15*B + 13*C)*a^3*cos(d *x + c)^3 + 8*(5*A + 15*B + 19*C)*a^3*cos(d*x + c)^2 + 30*(B + 3*C)*a^3*co s(d*x + c) + 24*C*a^3)*sin(d*x + c))/(d*cos(d*x + c)^5)
\[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^{3} \left (\int A \sec {\left (c + d x \right )}\, dx + \int 3 A \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 A \sec ^{3}{\left (c + d x \right )}\, dx + \int A \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 B \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 B \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{5}{\left (c + d x \right )}\, dx + \int C \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 C \sec ^{4}{\left (c + d x \right )}\, dx + \int 3 C \sec ^{5}{\left (c + d x \right )}\, dx + \int C \sec ^{6}{\left (c + d x \right )}\, dx\right ) \]
a**3*(Integral(A*sec(c + d*x), x) + Integral(3*A*sec(c + d*x)**2, x) + Int egral(3*A*sec(c + d*x)**3, x) + Integral(A*sec(c + d*x)**4, x) + Integral( B*sec(c + d*x)**2, x) + Integral(3*B*sec(c + d*x)**3, x) + Integral(3*B*se c(c + d*x)**4, x) + Integral(B*sec(c + d*x)**5, x) + Integral(C*sec(c + d* x)**3, x) + Integral(3*C*sec(c + d*x)**4, x) + Integral(3*C*sec(c + d*x)** 5, x) + Integral(C*sec(c + d*x)**6, x))
Leaf count of result is larger than twice the leaf count of optimal. 439 vs. \(2 (163) = 326\).
Time = 0.24 (sec) , antiderivative size = 439, normalized size of antiderivative = 2.51 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {80 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a^{3} + 240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{3} + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a^{3} + 240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} - 15 \, B a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 45 \, C a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, A a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, B a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, C a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 240 \, A a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 720 \, A a^{3} \tan \left (d x + c\right ) + 240 \, B a^{3} \tan \left (d x + c\right )}{240 \, d} \]
integrate(sec(d*x+c)*(a+a*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
1/240*(80*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*a^3 + 240*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a^3 + 16*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan( d*x + c))*C*a^3 + 240*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a^3 - 15*B*a^3*( 2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 45*C*a^3*(2*(3* sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 180*A*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1) ) - 180*B*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 60*C*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 240*A*a^3*log(sec(d*x + c) + tan(d*x + c)) + 720*A*a^3*tan(d*x + c) + 240*B*a^3*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (163) = 326\).
Time = 0.40 (sec) , antiderivative size = 341, normalized size of antiderivative = 1.95 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (20 \, A a^{3} + 15 \, B a^{3} + 13 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (20 \, A a^{3} + 15 \, B a^{3} + 13 \, C a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (300 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 225 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 195 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 1400 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 1050 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 910 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 2560 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1920 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1664 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2120 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1830 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1330 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 660 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 735 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 765 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \]
1/120*(15*(20*A*a^3 + 15*B*a^3 + 13*C*a^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15*(20*A*a^3 + 15*B*a^3 + 13*C*a^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1 )) - 2*(300*A*a^3*tan(1/2*d*x + 1/2*c)^9 + 225*B*a^3*tan(1/2*d*x + 1/2*c)^ 9 + 195*C*a^3*tan(1/2*d*x + 1/2*c)^9 - 1400*A*a^3*tan(1/2*d*x + 1/2*c)^7 - 1050*B*a^3*tan(1/2*d*x + 1/2*c)^7 - 910*C*a^3*tan(1/2*d*x + 1/2*c)^7 + 25 60*A*a^3*tan(1/2*d*x + 1/2*c)^5 + 1920*B*a^3*tan(1/2*d*x + 1/2*c)^5 + 1664 *C*a^3*tan(1/2*d*x + 1/2*c)^5 - 2120*A*a^3*tan(1/2*d*x + 1/2*c)^3 - 1830*B *a^3*tan(1/2*d*x + 1/2*c)^3 - 1330*C*a^3*tan(1/2*d*x + 1/2*c)^3 + 660*A*a^ 3*tan(1/2*d*x + 1/2*c) + 735*B*a^3*tan(1/2*d*x + 1/2*c) + 765*C*a^3*tan(1/ 2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^5)/d
Time = 20.23 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.67 \[ \int \sec (c+d x) (a+a \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^3\,\mathrm {atanh}\left (\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (20\,A+15\,B+13\,C\right )}{2\,\left (10\,A\,a^3+\frac {15\,B\,a^3}{2}+\frac {13\,C\,a^3}{2}\right )}\right )\,\left (20\,A+15\,B+13\,C\right )}{4\,d}-\frac {\left (5\,A\,a^3+\frac {15\,B\,a^3}{4}+\frac {13\,C\,a^3}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (-\frac {70\,A\,a^3}{3}-\frac {35\,B\,a^3}{2}-\frac {91\,C\,a^3}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {128\,A\,a^3}{3}+32\,B\,a^3+\frac {416\,C\,a^3}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {106\,A\,a^3}{3}-\frac {61\,B\,a^3}{2}-\frac {133\,C\,a^3}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (11\,A\,a^3+\frac {49\,B\,a^3}{4}+\frac {51\,C\,a^3}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
(a^3*atanh((a^3*tan(c/2 + (d*x)/2)*(20*A + 15*B + 13*C))/(2*(10*A*a^3 + (1 5*B*a^3)/2 + (13*C*a^3)/2)))*(20*A + 15*B + 13*C))/(4*d) - (tan(c/2 + (d*x )/2)^9*(5*A*a^3 + (15*B*a^3)/4 + (13*C*a^3)/4) - tan(c/2 + (d*x)/2)^7*((70 *A*a^3)/3 + (35*B*a^3)/2 + (91*C*a^3)/6) - tan(c/2 + (d*x)/2)^3*((106*A*a^ 3)/3 + (61*B*a^3)/2 + (133*C*a^3)/6) + tan(c/2 + (d*x)/2)^5*((128*A*a^3)/3 + 32*B*a^3 + (416*C*a^3)/15) + tan(c/2 + (d*x)/2)*(11*A*a^3 + (49*B*a^3)/ 4 + (51*C*a^3)/4))/(d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1))